﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DDD4Fun.Mediator
{
    public interface IMessageMediator
    {
        void Register<TMessage>(object recipient, Action<TMessage> action);
        void Register<TMessage>(object recipient, Action<TMessage> action, object token);
        void Send<TMessage>(TMessage message);
        void Send<TMessage, TTarget>(TMessage message);
        void Send<TMessage>(TMessage message, object token);
        void UnRegister(object recipient);
        void UnRegister<TMessage>(object recipient);
        void UnRegister<TMessage>(object recipient,object token);
    }
}
